module.exports = function(remoteData) {
    var r = remoteData;
    var localArray = [];
    remoteData.map(function(i) {
        var localData = {
            platform: i.Platform,
            match_name: i.Match_name,
            match_id: i.Match_id,
            md5: i.Md5,
            date: new Date(),
            task: i.Task,
            bssid: i.BSSID,
            userinfo: {
                user: i.Userid,
                username: i.Username,
                playerId: i.PlayerId,
            },
            match: {
                preflop: {
                    pot: i.Match.Preflop.Pot,
                    card: i.Match.Preflop.Card,
                    sidepot: i.Match.Preflop.Sidepot,
                    actions: i.Match.Preflop.Actions
                },
                flop: {
                    pot: i.Match.Flop.Pot,
                    card: i.Match.Flop.Card,
                    sidepot: i.Match.Flop.Sidepot,
                    actions: i.Match.Flop.Actions
                },
                turn: {
                    pot: i.Match.Turn.Pot,
                    card: i.Match.Turn.Card,
                    sidepot: i.Match.Turn.Sidepot,
                    actions: i.Match.Turn.Actions
                },
                river: {
                    pot: i.Match.Preflop.Pot,
                    card: i.Match.Preflop.Card,
                    sidepot: i.Match.Preflop.Sidepot,
                    actions: i.Match.Preflop.Actions
                },
                showdown: {
                    player: [
                        {
                            playerId: String,
                            action: String,
                            card: Array,
                            seatNumber: Number,
                            status: Number
                        }
                    ]
                },
                showcard: {
                    player: [
                        {
                            playerId: String,
                            card: String,
                        }
                    ]
                },
                table: {
                    seat: [
                        {
                            name: String,
                            playerId: String,
                            chips: Number,
                            seatNumber: Number,
                            avatar: String
                        }
                    ],
                    sb: {
                        chips: Number,
                        number: Number
                    },
                    bb: {
                        chips: Number,
                        number: Number
                    },
                    ante: [
                        {
                            playerId: String,
                            action: String,
                        }
                    ],
                    dealer: Number
                }
            }
        };
    })
}
